package com.gdglc.spring.biz.auth;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.y2.authprj.bean.auth.model.FunctionauthorityInfo;

public interface FunctionauthorityBiz {
	//查询全部
	public List<FunctionauthorityInfo> findAll();
	//根据id查询
	public FunctionauthorityInfo findById(String id);
	//根据父节点查询全部
	public List<FunctionauthorityInfo> findByParentId(String parentId);
	//将节点改编为父节点
	public int updateIsgroup(FunctionauthorityInfo functionauthorityInfo);
	//新增
	public int add(FunctionauthorityInfo info);
	//删除
	public int delete();
	//修改
	public int update(FunctionauthorityInfo info);
	//查询是否是父节点
	public int getIsGroup(@Param("id")int id);	
	//删除父节点以及所有子节点
	public int deleteParentById(@Param("parentId")int parentId);
	//根据根节点Id查询是否有子节点
	public List<FunctionauthorityInfo> getChileByRoot(@Param("id") int id);
	//根据权限名查询用户信息
	public List<FunctionauthorityInfo> findFunctionauthorityByName(String name);
	//根据staffId查找所有该用户所有权限id
	public List<String> getAllFunctionauthorityIdByStaffId(@Param("staffId") String id);
}
